import React from 'react';
import Router from '../route/router';
import '../styles/App.scss';
import {
	getSdk
} from 'api/moments.js'
// require('styles/App.scss');

class AppComponent extends React.Component {
		componentDidMount() {
			getSdk({
				company_id: 10000,
				app_agent_id: 1000002,
				url: window.location.href
			}).then(res => {
				wx.config({ // eslint-disable-line
					debug: false,
					appId: 'ww0f1092726464b49d',
					timestamp: res.data.timestamp,
					nonceStr: res.data.nonceStr,
					signature: res.data.signature,
					jsApiList: [
						'hideMenuItems'
					]
				})
				wx.ready(function() { // eslint-disable-line
					wx.hideMenuItems({ // eslint-disable-line
						menuList: ['menuItem:share:appMessage', 'menuItem:share:wechat', 'menuItem:copyUrl', 'menuItem:favorite']
					})
				})
			})
		}
		componentWillMount() {
			window.baseUrl = '/webEmployee'
		}
		render() {
				return (<div className = "index" >
			<Router /> <
			/div>
		);
	}
}

AppComponent.defaultProps = {};

export default AppComponent;